<div id="editBoard" class="modal fade" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">Edit Board</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" role="form" id="editBoardForm"
					action="board.do" method="post">
					<input type="hidden" name="boardId">
					<input id="editBoardHiddenField" type="hidden" name="task">
					<div class="form-group">
						<div class="col-sm-10">
							<input type="text" class="form-control" name="ename"
								placeholder="Name">
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-10">
							<input type="text" class="form-control" name="edescription"
								placeholder="Description">
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-10">
							<label class="radio-inline control-label"> <input
								type="radio" name="etype" value="public">Public
							</label> <label class="radio-inline control-label"> <input
								type="radio" name="etype" value="private">Private
							</label>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-primary" onclick="deleteBoard();">Delete</button>
						<button type="button" class="btn btn-primary"
							onclick="updateBoard();">Update</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</div>
				</form>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>

<script>
	function updateBoard() {
		document.getElementById('editBoardHiddenField').value = "update";
		document.getElementById('editBoardForm').submit();
	}
	
	function deleteBoard(){
		document.getElementById('editBoardHiddenField').value = "delete";
		document.getElementById('editBoardForm').submit();
	}
</script>